package com.qjc.demo.observer.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 观察者模式事件类
 *
 * @ClassName: ObserverEvent
 * @Author: qjc
 * @Date: 2023/5/10 15:13
 */
@Getter
public class ObserverEvent extends ApplicationEvent {

    private ObserverEvent(MessageVO messageVO) {
        super(messageVO);
    }

    /**
     * 创建一个事件对象
     *
     * @Author: qjc
     * @Date: 2023/5/10 15:39
     * @Param: messageVO
     * @Return:
     */
    public static ObserverEvent buildEvent(MessageVO messageVO) {
        return new ObserverEvent(messageVO);
    }

}
